<!DOCTYPE html>
<html devsite>
  <head>
    <title>TensorFlowLiteSwift Framework Reference</title>
    <link rel="stylesheet" href="../css/jazzy.css" />
    <meta charset='utf-8'>
  </head>
  <body>
    <div class="content-wrapper">
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Tensor</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Tensor</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>

                </div>
              </div>
            <p>An input or output tensor in a TensorFlow Lite graph.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V4nameSSvp"></a>
                    <a name="//apple_ref/swift/Property/name" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V4nameSSvp">name</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The name of the <code>Tensor</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V8dataTypeAC04DataF0Ovp"></a>
                    <a name="//apple_ref/swift/Property/dataType" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8dataTypeAC04DataF0Ovp">dataType</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The data type of the <code>Tensor</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">dataType</span><span class="p">:</span> <span class="kt"><a href="../Structs/Tensor/DataType.html">DataType</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V5shapeAC5ShapeVvp"></a>
                    <a name="//apple_ref/swift/Property/shape" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5shapeAC5ShapeVvp">shape</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The shape of the <code>Tensor</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">shape</span><span class="p">:</span> <span class="kt"><a href="../Structs/Tensor/Shape.html">Shape</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V4data10Foundation4DataVvp"></a>
                    <a name="//apple_ref/swift/Property/data" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V4data10Foundation4DataVvp">data</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The data in the input or output <code>Tensor</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V22quantizationParametersAA012QuantizationF0VSgvp"></a>
                    <a name="//apple_ref/swift/Property/quantizationParameters" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V22quantizationParametersAA012QuantizationF0VSgvp">quantizationParameters</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The quantization parameters for the <code>Tensor</code> if using a quantized model.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">quantizationParameters</span><span class="p">:</span> <span class="kt"><a href="../Structs/QuantizationParameters.html">QuantizationParameters</a></span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO"></a>
                    <a name="//apple_ref/swift/Enum/DataType" class="dashAnchor"></a>
                    <h3><a class="token" href="../Structs/Tensor/DataType.html">DataType</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The supported <code><a href="../Structs/Tensor.html">Tensor</a></code> data types.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">DataType</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift0A0V5ShapeV"></a>
                    <a name="//apple_ref/swift/Struct/Shape" class="dashAnchor"></a>
                    <h3><a class="token" href="../Structs/Tensor/Shape.html">Shape</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The shape of a <code><a href="../Structs/Tensor.html">Tensor</a></code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Shape</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../Structs/Tensor.html">Tensor</a></span><span class="o">.</span><span class="kt">Shape</span><span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>          </section>
        </section>
      </article>
    </div>
  </body>
</html>
